package com.ruoyi.department.service.impl;

import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.department.mapper.TbDepartmentMapper;
import com.ruoyi.department.domain.TbDepartment;
import com.ruoyi.department.service.ITbDepartmentService;

/**
 * 部门表Service业务层处理
 * 
 * @author zx
 * @date 2025-02-25
 */
@Service
public class TbDepartmentServiceImpl implements ITbDepartmentService 
{
    @Autowired
    private TbDepartmentMapper tbDepartmentMapper;

    /**
     * 查询部门表
     * 
     * @param id 部门表主键
     * @return 部门表
     */
    @Override
    public TbDepartment selectTbDepartmentById(Long id)
    {
        return tbDepartmentMapper.selectTbDepartmentById(id);
    }

    /**
     * 查询部门表列表
     * 
     * @param tbDepartment 部门表
     * @return 部门表
     */
    @Override
    public List<TbDepartment> selectTbDepartmentList(TbDepartment tbDepartment)
    {
        return tbDepartmentMapper.selectTbDepartmentList(tbDepartment);
    }

    /**
     * 新增部门表
     * 
     * @param tbDepartment 部门表
     * @return 结果
     */
    @Override
    public int insertTbDepartment(TbDepartment tbDepartment)
    {
        return tbDepartmentMapper.insertTbDepartment(tbDepartment);
    }

    /**
     * 修改部门表
     * 
     * @param tbDepartment 部门表
     * @return 结果
     */
    @Override
    public int updateTbDepartment(TbDepartment tbDepartment)
    {
        return tbDepartmentMapper.updateTbDepartment(tbDepartment);
    }

    /**
     * 批量删除部门表
     * 
     * @param ids 需要删除的部门表主键
     * @return 结果
     */
    @Override
    public int deleteTbDepartmentByIds(Long[] ids)
    {
        return tbDepartmentMapper.deleteTbDepartmentByIds(ids);
    }

    /**
     * 删除部门表信息
     * 
     * @param id 部门表主键
     * @return 结果
     */
    @Override
    public int deleteTbDepartmentById(Long id)
    {
        return tbDepartmentMapper.deleteTbDepartmentById(id);
    }
}
